<template>
  <!-- 4. 设置轮播图高度 -->
  <swiper :style="{ height: height }" class="carousel" autoplay indicator-dots circular>
    <!-- 3. 列表渲染, 插值显示 -->
    <swiper-item v-for="item in banners" :key="item.id">
      <image :src="item.imgUrl" />
    </swiper-item>
  </swiper>
</template>
  
<script setup>

const props = defineProps({
  banners: Array,
  height: String
})


</script>
  
<style scoped>
.carousel {
  height: 100%;
}
</style>